package cn.coco.jf.fw.admin.config;

import com.alibaba.fastjson.JSONObject;
import com.jfinal.render.JsonRender;
import com.jfinal.render.Render;
import com.jfinal.render.RenderFactory;

public class JkwebRenderFactory extends RenderFactory {

	@Override
	public Render getErrorRender(int errorCode) {
		if(errorCode == 404){
			JSONObject json = new JSONObject();
             json.put("code", 404);
             json.put("msg", "请求路径不存在!");
             return new JsonRender(json);
		}
		return super.getErrorRender(errorCode);
	}
	

}
